.class public Lcom/jecelyin/editor/v2/ui/f;
.super Ljava/lang/Object;
.source "RecentFilesManager.java"

# interfaces
.implements Lcom/jecelyin/common/widget/dialog/a$d;
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/jecelyin/editor/v2/ui/f$a;
    }
.end annotation


# instance fields
.field private final a:Lcom/jecelyin/editor/v2/utils/b;

.field private b:Lcom/jecelyin/editor/v2/ui/f$a;

.field private c:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lcom/jecelyin/editor/v2/utils/b$a;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object p1

    invoke-static {p1}, Lcom/jecelyin/editor/v2/utils/b;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/utils/b;

    move-result-object p1

    iput-object p1, p0, Lcom/jecelyin/editor/v2/ui/f;->a:Lcom/jecelyin/editor/v2/utils/b;

    return-void
.end method


# virtual methods
.method public a(Landroid/content/Context;)V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/f;->a:Lcom/jecelyin/editor/v2/utils/b;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/utils/b;->b()Ljava/util/ArrayList;

    move-result-object v0

    iput-object v0, p0, Lcom/jecelyin/editor/v2/ui/f;->c:Ljava/util/ArrayList;

    .line 2
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    new-array v0, v0, [Ljava/lang/String;

    .line 3
    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/f;->c:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    :goto_0
    if-ltz v1, :cond_0

    .line 4
    iget-object v2, p0, Lcom/jecelyin/editor/v2/ui/f;->c:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/jecelyin/editor/v2/utils/b$a;

    iget-object v2, v2, Lcom/jecelyin/editor/v2/utils/b$a;->a:Ljava/lang/String;

    aput-object v2, v0, v1

    add-int/lit8 v1, v1, -0x1

    goto :goto_0

    .line 5
    :cond_0
    new-instance v1, Lcom/jecelyin/common/widget/dialog/c;

    invoke-direct {v1, p1}, Lcom/jecelyin/common/widget/dialog/c;-><init>(Landroid/content/Context;)V

    .line 6
    invoke-virtual {v1, v0}, Lcom/jecelyin/common/widget/dialog/c;->a([Ljava/lang/CharSequence;)Lcom/jecelyin/common/widget/dialog/c;

    sget p1, Lcom/jecelyin/editor/v2/m;->je_clear_history:I

    .line 7
    invoke-virtual {v1, p1}, Lcom/jecelyin/common/widget/dialog/a$c;->b(I)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 8
    invoke-virtual {v1, p0}, Lcom/jecelyin/common/widget/dialog/a$c;->a(Landroid/content/DialogInterface$OnClickListener;)Lcom/jecelyin/common/widget/dialog/a$c;

    sget p1, Lcom/jecelyin/editor/v2/m;->je_close:I

    .line 9
    invoke-virtual {v1, p1}, Lcom/jecelyin/common/widget/dialog/a$c;->d(I)Lcom/jecelyin/common/widget/dialog/a$c;

    sget p1, Lcom/jecelyin/editor/v2/m;->je_recent_files:I

    .line 10
    invoke-virtual {v1, p1}, Lcom/jecelyin/common/widget/dialog/a$c;->f(I)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 11
    invoke-virtual {v1, p0}, Lcom/jecelyin/common/widget/dialog/a$c;->a(Lcom/jecelyin/common/widget/dialog/a$d;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 12
    invoke-virtual {v1}, Lcom/jecelyin/common/widget/dialog/a$c;->c()Lcom/jecelyin/common/widget/dialog/a;

    return-void
.end method

.method public a(Lcom/jecelyin/common/widget/dialog/a;ILcom/jecelyin/common/widget/dialog/vh/AbstractDialogViewHolder;Lcom/jecelyin/common/widget/dialog/DialogListAdapter$b;)V
    .locals 0

    .line 13
    iget-object p3, p0, Lcom/jecelyin/editor/v2/ui/f;->b:Lcom/jecelyin/editor/v2/ui/f$a;

    if-nez p3, :cond_0

    return-void

    .line 14
    :cond_0
    invoke-virtual {p1}, Landroid/app/Dialog;->cancel()V

    .line 15
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/f;->c:Ljava/util/ArrayList;

    invoke-virtual {p1, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/jecelyin/editor/v2/utils/b$a;

    .line 16
    iget-object p2, p0, Lcom/jecelyin/editor/v2/ui/f;->b:Lcom/jecelyin/editor/v2/ui/f$a;

    invoke-interface {p2, p1}, Lcom/jecelyin/editor/v2/ui/f$a;->a(Lcom/jecelyin/editor/v2/utils/b$a;)V

    return-void
.end method

.method public a(Lcom/jecelyin/editor/v2/ui/f$a;)V
    .locals 0

    .line 17
    iput-object p1, p0, Lcom/jecelyin/editor/v2/ui/f;->b:Lcom/jecelyin/editor/v2/ui/f$a;

    return-void
.end method

.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 1

    const/4 v0, -0x2

    if-ne p2, v0, :cond_0

    .line 1
    invoke-interface {p1}, Landroid/content/DialogInterface;->cancel()V

    .line 2
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/f;->a:Lcom/jecelyin/editor/v2/utils/b;

    invoke-virtual {p1}, Lcom/jecelyin/editor/v2/utils/b;->a()V

    :cond_0
    return-void
.end method
